package cn.darkhorse.workflow.service;

import cn.darkhorse.workflow.auto.entity.BpmnSysUser;
import cn.darkhorse.workflow.auto.entity.ProjectApprovalOpinions;
import com.alibaba.fastjson.JSONArray;


import java.util.List;
import java.util.Map;

/**
 * @description:
 * @author: mr.wang
 * @time: 2020/7/6 0006 14:18
 */
public interface IApprovalService {
	
	
	/**
	 * 选取可发起的流程
	 * @param typeId
	 */
	List<Map<String,Object>> chooseWorkflow(String typeId,String userName);
	
	
	/**
	 * 待办事项（临时）
	 * @param userName
	 */
	List<Map<String,Object>> selectSchedule(String userName);
	
	/**
	 * 查询审批表意见
	 * @param businessId
	 * @return
	 */
	List<ProjectApprovalOpinions> getApprovalFormInfo(String businessId, String businessType);

	/**
	 * 查询本轮的审批意见
	 * @param businessId
	 * @param businessType
	 * @return
	 */
	List<ProjectApprovalOpinions> getApprovalFormInfo2(String businessId, String businessType);

	/**
	 * 获取审批权限（同意，不同意，否决）
	 * @param taskKey
	 * @return
	 */
	Map<String,Object> getApprovalAuthority(String taskKey, String taskId, String workflowExampleId);
	
	
	/**
	 *流程图
	 * @param businessId
	 * @param businessType
	 */
	Map<String,Object> getFlowChart(Long businessId, String businessType, String workflowExampleId);
	
	/**
	 * 下一节点
	 * @param businessId
	 * @param businessType
	 * @return
	 */
	JSONArray getNextNode(String workFlowId, String businessId, String businessType, List<BpmnSysUser> users);
	
}
